Model run by stephane.hess using Apollo 0.3.6 on R 4.5.1 for Darwin. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : ECL_preference_space_panel_effect Model description : Error components logit model on Swiss route choice data, uncorrelated Lognormals in preference space, with panel effect term Model run at : 2025-09-19 12:46:02.368786 Estimation method : bgw Estimation diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -30.355473 reciprocal of condition number : 0.0485588 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 4 Number of inter-individual draws : 500 (mlhs) LL(start) : -2253.75 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : -2420.39 LL(final) : -1442.58 Rho-squared vs equal shares : 0.404 Adj.Rho-squared vs equal shares : 0.4003 Rho-squared vs observed shares : 0.404 Adj.Rho-squared vs observed shares : 0.4007 AIC : 2903.16 BIC : 2958.58 Estimated parameters : 9 Time taken (hh:mm:ss) : 00:00:32.79 pre-estimation : 00:00:7.79 estimation : 00:00:6.61 post-estimation : 00:00:18.38 Iterations : 17 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) mu_log_b_tt -1.9890 0.09062 -21.950 0.11243 -17.691 sigma_log_b_tt 0.5025 0.07554 6.652 0.07026 7.152 mu_log_b_tc -1.0418 0.14693 -7.091 0.19096 -5.456 sigma_log_b_tc -1.0322 0.09645 -10.702 0.10971 -9.409 mu_log_b_hw -2.9023 0.08685 -33.419 0.09322 -31.134 sigma_log_b_hw 0.7928 0.14237 5.569 0.20967 3.781 mu_log_b_ch 0.6565 0.07610 8.626 0.08421 7.795 sigma_log_b_ch 0.8475 0.10663 7.948 0.11954 7.090 sigma_panel 0.3739 0.09741 3.838 0.12430 3.008 Overview of choices for MNL model component : alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Classical covariance matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 0.008212 -0.002446 0.008428 0.002832 0.001772 sigma_log_b_tt -0.002446 0.005706 2.9910e-04 -0.001343 0.001095 mu_log_b_tc 0.008428 2.9910e-04 0.021587 0.008891 0.002507 sigma_log_b_tc 0.002832 -0.001343 0.008891 0.009303 -8.0837e-04 mu_log_b_hw 0.001772 0.001095 0.002507 -8.0837e-04 0.007542 sigma_log_b_hw 0.002234 -1.1700e-04 0.003474 0.003338 -0.003159 mu_log_b_ch 0.002392 6.0264e-04 0.002707 -3.3890e-04 0.001745 sigma_log_b_ch 0.001457 2.1446e-04 0.001679 -5.6699e-04 7.4203e-04 sigma_panel 0.001784 4.2464e-04 0.002084 -2.5389e-04 0.002208 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_panel mu_log_b_tt 0.002234 0.002392 0.001457 0.001784 sigma_log_b_tt -1.1700e-04 6.0264e-04 2.1446e-04 4.2464e-04 mu_log_b_tc 0.003474 0.002707 0.001679 0.002084 sigma_log_b_tc 0.003338 -3.3890e-04 -5.6699e-04 -2.5389e-04 mu_log_b_hw -0.003159 0.001745 7.4203e-04 0.002208 sigma_log_b_hw 0.020270 0.001729 -0.001020 1.3988e-04 mu_log_b_ch 0.001729 0.005791 2.9465e-04 0.002195 sigma_log_b_ch -0.001020 2.9465e-04 0.011370 -9.856e-06 sigma_panel 1.3988e-04 0.002195 -9.856e-06 0.009489 Robust covariance matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 0.012640 -0.002922 0.016697 0.006365 0.003147 sigma_log_b_tt -0.002922 0.004936 -5.4747e-04 -0.002767 0.001445 mu_log_b_tc 0.016697 -5.4747e-04 0.036465 0.014415 0.005350 sigma_log_b_tc 0.006365 -0.002767 0.014415 0.012037 -8.1534e-04 mu_log_b_hw 0.003147 0.001445 0.005350 -8.1534e-04 0.008690 sigma_log_b_hw 0.005325 -6.1556e-04 0.009974 0.011069 -0.004543 mu_log_b_ch 0.004672 4.8107e-04 0.006751 0.001035 0.003368 sigma_log_b_ch 0.001351 5.3612e-04 0.002625 -7.8142e-04 4.7977e-04 sigma_panel 0.001984 3.0768e-04 0.002872 4.0631e-04 0.001467 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_panel mu_log_b_tt 0.005325 0.004672 0.001351 0.001984 sigma_log_b_tt -6.1556e-04 4.8107e-04 5.3612e-04 3.0768e-04 mu_log_b_tc 0.009974 0.006751 0.002625 0.002872 sigma_log_b_tc 0.011069 0.001035 -7.8142e-04 4.0631e-04 mu_log_b_hw -0.004543 0.003368 4.7977e-04 0.001467 sigma_log_b_hw 0.043963 0.003117 -0.003108 0.003479 mu_log_b_ch 0.003117 0.007092 3.6133e-04 0.002561 sigma_log_b_ch -0.003108 3.6133e-04 0.014289 -5.818e-06 sigma_panel 0.003479 0.002561 -5.818e-06 0.015451 Classical correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 1.0000 -0.35730 0.63300 0.32400 0.22521 sigma_log_b_tt -0.3573 1.00000 0.02695 -0.18428 0.16697 mu_log_b_tc 0.6330 0.02695 1.00000 0.62739 0.19646 sigma_log_b_tc 0.3240 -0.18428 0.62739 1.00000 -0.09650 mu_log_b_hw 0.2252 0.16697 0.19646 -0.09650 1.00000 sigma_log_b_hw 0.1732 -0.01088 0.16608 0.24307 -0.25548 mu_log_b_ch 0.3468 0.10484 0.24213 -0.04617 0.26400 sigma_log_b_ch 0.1508 0.02663 0.10718 -0.05513 0.08013 sigma_panel 0.2021 0.05771 0.14560 -0.02702 0.26096 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_panel mu_log_b_tt 0.17319 0.34684 0.15075 0.20208 sigma_log_b_tt -0.01088 0.10484 0.02663 0.05771 mu_log_b_tc 0.16608 0.24213 0.10718 0.14560 sigma_log_b_tc 0.24307 -0.04617 -0.05513 -0.02702 mu_log_b_hw -0.25548 0.26400 0.08013 0.26096 sigma_log_b_hw 1.00000 0.15955 -0.06721 0.01009 mu_log_b_ch 0.15955 1.00000 0.03631 0.29613 sigma_log_b_ch -0.06721 0.03631 1.00000 -9.4884e-04 sigma_panel 0.01009 0.29613 -9.4884e-04 1.00000 Robust correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 1.0000 -0.36996 0.77773 0.51603 0.30024 sigma_log_b_tt -0.3700 1.00000 -0.04081 -0.35896 0.22062 mu_log_b_tc 0.7777 -0.04081 1.00000 0.68805 0.30056 sigma_log_b_tc 0.5160 -0.35896 0.68805 1.00000 -0.07972 mu_log_b_hw 0.3002 0.22062 0.30056 -0.07972 1.00000 sigma_log_b_hw 0.2259 -0.04179 0.24910 0.48118 -0.23242 mu_log_b_ch 0.4935 0.08131 0.41978 0.11202 0.42901 sigma_log_b_ch 0.1005 0.06384 0.11502 -0.05958 0.04306 sigma_panel 0.1420 0.03523 0.12098 0.02979 0.12662 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_panel mu_log_b_tt 0.22589 0.49350 0.10053 0.14196 sigma_log_b_tt -0.04179 0.08131 0.06384 0.03523 mu_log_b_tc 0.24910 0.41978 0.11502 0.12098 sigma_log_b_tc 0.48118 0.11202 -0.05958 0.02979 mu_log_b_hw -0.23242 0.42901 0.04306 0.12662 sigma_log_b_hw 1.00000 0.17655 -0.12399 0.13347 mu_log_b_ch 0.17655 1.00000 0.03589 0.24464 sigma_log_b_ch -0.12399 0.03589 1.00000 -3.9153e-04 sigma_panel 0.13347 0.24464 -3.9153e-04 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 16178 0.2477970 22580 0.2754525 15174 0.2794802 21623 0.3058695 23205 0.3136014 76862 0.3231033 16489 0.3269253 21922 0.3401092 12534 0.3453328 15056 0.3547080 24627 0.3693377 22961 0.3760609 16617 0.3788483 22820 0.3859716 14754 0.3906312 16184 0.3940484 82613 0.3974056 20100 0.3983277 17187 0.4095261 15312 0.4241957 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Error components logit model on Swiss route choice data, uncorrelated Lognormals in preference space, with panel effect term" indivID "ID" nCores "4" outputDirectory "output/" mixing "TRUE" debug "FALSE" modelName "ECL_preference_space_panel_effect" workInLogs "FALSE" seed "13" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" memorySaver "FALSE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient Scaling used in computing Hessian --------------------------------- Value mu_log_b_tt 1.9890305 sigma_log_b_tt 0.5024952 mu_log_b_tc 1.0418156 sigma_log_b_tc 1.0322246 mu_log_b_hw 2.9023114 sigma_log_b_hw 0.7928476 mu_log_b_ch 0.6564549 sigma_log_b_ch 0.8474672 sigma_panel 0.3739033 apollo_randCoeff ------------------ function(apollo_beta, apollo_inputs){ randcoeff = list() randcoeff[["b_tt"]] = -exp( mu_log_b_tt + sigma_log_b_tt * draws_tt ) randcoeff[["b_tc"]] = -exp( mu_log_b_tc + sigma_log_b_tc * draws_tc ) randcoeff[["b_hw"]] = -exp( mu_log_b_hw + sigma_log_b_hw * draws_hw ) randcoeff[["b_ch"]] = -exp( mu_log_b_ch + sigma_log_b_ch * draws_ch ) randcoeff[["ec_alt1"]] = sigma_panel * draws_alt1 randcoeff[["ec_alt2"]] = sigma_panel * draws_alt2 return(randcoeff) } apollo_probabilities ---------------------- function(apollo_beta, apollo_inputs, functionality="estimate"){ ### Function initialisation: do not change the following three commands ### Attach inputs and detach after function exit apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) ### Create list of probabilities P P = list() ### List of utilities: these must use the same names as in mnl_settings, order is irrelevant V = list() V[["alt1"]] = b_tt * tt1 + b_tc * tc1 + b_hw * hw1 + b_ch * ch1 + ec_alt1 V[["alt2"]] = b_tt * tt2 + b_tc * tc2 + b_hw * hw2 + b_ch * ch2 + ec_alt2 ### Define settings for MNL model component mnl_settings = list( alternatives = c(alt1=1, alt2=2), avail = list(alt1=1, alt2=1), choiceVar = choice, utilities = V ) ### Compute probabilities using MNL model P[["model"]] = apollo_mnl(mnl_settings, functionality) ### Take product across observation for same individual P = apollo_panelProd(P, apollo_inputs, functionality) ### Average across inter-individual draws P = apollo_avgInterDraws(P, apollo_inputs, functionality) ### Prepare and return outputs of function P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }